import request from '@/utils/request'

// 查询ChildHeight列表
export function listChildHeight(childId, query) {
    return request({
        url: '/api/v1/childheightList/' + childId,
        method: 'get',
        params: query
    })
}

// 查询ChildHeight详细
export function getChildHeight(heightId) {
    return request({
        url: '/api/v1/childheight/' + heightId,
        method: 'get'
    })
}


// 新增ChildHeight
export function addChildHeight(data) {
    return request({
        url: '/api/v1/childheight',
        method: 'post',
        data: data
    })
}

// 修改ChildHeight
export function updateChildHeight(data) {
    return request({
        url: '/api/v1/childheight',
        method: 'put',
        data: data
    })
}

// 删除ChildHeight
export function delChildHeight(heightId) {
    return request({
        url: '/api/v1/childheight/' + heightId,
        method: 'delete'
    })
}

//获取身高记录曲线
export function listChildHeightCharts(childId) {
    return request({
        url: '/api/v1/charts/height/' + childId,
        method: 'get',
    })
}

//获取遗传身高曲线（-2SD至2SD和当前遗传身高等数据）
export function listChildHeightInheritCharts(childId) {
    return request({
        url: '/api/v1/charts/heightInherit/' + childId,
        method: 'get',
    })
}

//查询实测&遗传身高增量对比
export function listChildHeightIncrementalComparisonCharts(childId) {
    return request({
        url: '/api/v1/charts/heightIncrementalComparison/' + childId,
        method: 'get',
    })
}

//查询孩子身高排名
export function getChildHeightRanking(childId) {
    return request({
        url: '/api/v1/childheightRanking/' + childId,
        method: 'get',
    })
}

//查询实测身高和标准差  
export function getChildMeasuredHeight(childId) {
    return request({
        url: '/api/v1/childMeasuredHeight/' + childId,
        method: 'get',
    })
}


// 获取孩子的身高正太分布曲线
export function listChildHeightNormalCharts(childId) {
    return request({
        url: '/api/v1/charts/heightNormalDistribution/' + childId,
        method: 'get',
    })
}
